package com.example.factory.simple.calculator;

/**
 * 计算器：封装 操作类 基类
 */
public abstract class Operation {

    private double num1;
    private double num2;


    public abstract double getResult();

    public double getNum1() {
        return num1;
    }

    public void setNum1(double num1) {
        this.num1 = num1;
    }

    public double getNum2() {
        return num2;
    }

    public void setNum2(double num2) {
        this.num2 = num2;
    }


    //    public static double getResult(double num1, double num2, Integer operation) {
//        switch (operation) {
//            case 1:
//                return num1 + num2;
//            case 2:
//                return num1 - num2;
//            case 3:
//                return num1 * num2;
//            case 4:
//                return num1 / num2;
//
//        }
//        return 0D;
//    }

}
